'use strict';

module.exports = appInfo => {
  const config = exports = {};

  //   const test_url = 'http://192.168.1.155:9999/api/zpdksq';
  //   config.nsrsbh = '421281199002102731';
  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_pb_123';

  //   config.base_url = test_url;
  //   config.middleware = ['filter'];

  config.view = {
    defaultViewEngine: 'nunjucks',
    mapping: {
      '.html': 'nunjucks',
    },
  };
  exports.session = {
    key: 'KEY_SESS',
    maxAge: 1800 * 1000, // 1 小时
    httpOnly: true,
    encrypt: true,
  };
  config.news = {
    // pageSize: 5,
    port1: '9090',
    port2: '9093',
    serverUrl: 'http://192.168.1.100', // 接口公共部分，通过this.config.news访问
  };

  config.security = {
    csrf: {
      enable: false,
    },
  };

  // 默认request超时时间
  config.httpclient = {
    request: {

      timeout: 60 * 1000,
    },
  };
  // 编写
  return config;
};
